/**
 * 
 */

function chack(){
	document.c.cc.focus();
}

function can(){
	location.href='../jsp/main.jsp';
}


function moid(){
	
	var f = document.modimodi;
	f.action = "join_main.jsp?inpage=../modify_result.jsp"
	f.submit();

}


function delet(){
	location.href="join_main.jsp?inpage=../delete.jsp";
}
function backk(){
	location.href='../jsp/main.jsp';
}


function inputInit(){
	
	document.getElementById("mid").onblur=function(){
		var m = document.join_form.mid.value;
		idChack = "../idChack.jsp?mid="+m;
		window.open(idChack,"new","width=370, height=120");
		document.join_form.pwd.focus();
	}
	
	
	document.getElementById("pwd2").onblur=function(){
		var f = document.join_form;
		if(f.pwd.value!=f.pwd2.value){
			alert('패스워드 제대로 입력해라');
			f.pwd2.value = "";
			f.pwd.focus();
		}
	}
	
	document.getElementById('btnSave').onclick=function(){
		var f = document.join_form;
		if (f.pwd.value == ''){
			alert('패스워드 입력해라');
			f.pwd.focus();
		} else if (f.irum.value == '') {
			alert('이름 입력해라');
			f.irum.focus();
		}else if(f.gender.value == ''){
			alert('성별 없냐');
		}else if(f.birth.value == ''){
			alert('생일 없냐');
		}
		else if(f.email.value == ''){
			alert('이메일.. 입력해라..');
			f.email.focus();
		}
		else if(f.phone1.value == ''||f.phone2.value == ''||f.phone3.value == ''){
			alert('폰넘버.. 입력해라..');
			f.phone.focus();
		}
		else if(f.job.value == ''){
			alert('직업 없냐..');
			f.job.focus();
		}
		else{
			f.action = "join_main.jsp?inpage=../input_result.jsp"
			f.submit();
		}
		
	}
}